Huffman coding
https://en.wikipedia.org/wiki/Huffman_coding